package com.imooc.order.service;

import com.alicp.jetcache.anno.CacheType;
import com.alicp.jetcache.anno.Cached;
import com.imooc.order.entity.Order;
import org.springframework.stereotype.Service;

import java.util.List;

public interface OrderService {
    Order create(Order order);

    List<Order> all() throws InterruptedException;

    @Cached(name = "order.get", key = "#id", expire = 3600, cacheType = CacheType.BOTH)
    Order get(Integer id);
}
